function addPayFunction() {
    var options = {
        "width": 980, "height": 600,
        buttons: [{
            id: "savePayFunction",
            text: '保存',
            handler: function () {
                parent.$.modalDialog.openner_treeGrid = $("#dataGrid");//因为添加成功之后，需要刷新这个treeGrid，所以先预定义好
            }
        }, {
            text: '返回',
            handler: function () {
                parent.$.modalDialog.openner_treeGrid = $("#dataGrid");
                parent.$.modalDialog.handler.dialog('close');
            }
        }]
    }
    var select = $("#dataGrid").datagrid('getSelections');
    if (select && select.length > 0) {
        //TODO
        editFun('添加付款单', '/paymentOrder/payAdd.html?id=',$("#dataGrid"), options);
    } else {
        parent.$.messager.alert('提示', '请选择一条数据.', 'info');
    }

}